package region

import (
	"context"

	"gitee.com/krio/grpc-go-server/dao/model/region"
	"gitee.com/krio/grpc-go-server/internal/dependency"
)

type RegionService struct {
	regionR dependency.RegionRepository
}

func NewRegionService(
	rR dependency.RegionRepository,
) *RegionService {
	return &RegionService{
		regionR: rR,
	}
}

func (r *RegionService) Add(ctx context.Context, req *region.Region) (int64, error) {
	return r.regionR.Add(ctx, req)
}
